Thread: *string_ptr[4], pointer of chars

  1. #16
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,653
    You only have 10. What's the value of nbdy_nodes?
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  2. #17
    Registered User
    Join Date
    Mar 2009
    Posts
    114
    Quote Originally Posted by Elysia View Post
    You only have 10. What's the value of nbdy_nodes?
    Sorry, I meant to put 10 for this thread but copied my code directly. The nbdy_nodes is coherent with my allocations in the real code; let's pretend it were 10 as in this forum though

    cfd

  3. #18
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,653
    Alright, then it's likely that the memory is corrupted somehow by BDY_FLAG.
    Comment it out, see if it fixes anything.
    If it does, then the easiest way to catch your error is to use a debugger or check for buffer overflows.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  4. #19
    Registered User
    Join Date
    Mar 2009
    Posts
    114
    Yes, indeed when I do not call the function BDY_FLAG I get all running fine;

    I debugged it and I was entering a part of memory not allocated!

    Man, this can give you a lot of headaches!

    thank you very much for helping

    Best
    CFD

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 0
    Last Post: 03-20-2008, 07:59 AM
  2. What is a virtual function pointer?
    By ting in forum C++ Programming
    Replies: 4
    Last Post: 03-05-2008, 02:36 AM
  3. scope of a pointer?
    By Syneris in forum C++ Programming
    Replies: 6
    Last Post: 12-29-2005, 09:40 PM
  4. pointers
    By InvariantLoop in forum C Programming
    Replies: 13
    Last Post: 02-04-2005, 09:32 AM
  5. Could somebody please help me with this C program
    By brett73 in forum C Programming
    Replies: 6
    Last Post: 11-25-2004, 02:19 AM